import { defHttp } from "@/utils/http";

// 零件信息 API
export const eqpartsApi = {
	// 查询零件信息分页
	eqpartsPage: async (params: any) => {
		return await defHttp.get({ url: `/whs/eqparts/page`, params });
	},

	// 新增零件信息
	eqpartsCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/eqparts/create`, data });
	},

	// 修改零件信息
	eqpartsuUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/eqparts/update`, data });
	},

	// 删除零件信息
	eqpartsDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/eqparts/delete?id=` + id });
	}
};
